package com.shoothzj.example.storage.mongo;

import com.mongodb.client.MongoClient;
import com.shoothzj.example.storage.api.IDatabase;
import com.shoothzj.example.storage.api.module.TableInfo;

import java.util.ArrayList;
import java.util.List;

public class MongoDatabaseService implements IDatabase {
    private final MongoClient mongoClient;

    public MongoDatabaseService(MongoClient mongoClient) {
        this.mongoClient = mongoClient;
    }

    @Override
    public List<String> schemas() {
        return mongoClient.listDatabaseNames().into(new ArrayList<>());
    }

    @Override
    public void createTable(String schema, String tableName, TableInfo tableInfo) {
    }
}
